<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="database.DAO, golf.Guild"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>길드 탈퇴</title>
</head>
<body>
<%
	DAO dao = DAO.getInstance();
	int serverNo = (Integer)session.getAttribute("serverNo");
	int charNo = (Integer)session.getAttribute("charNo");
	Guild.GuildMember member = dao.getGuildMember(charNo);
	Guild guild;
	
	if( member == null ){
		out.println("길드에 가입하지 않으셨습니다.");
	}
	else{
		guild = dao.getGuild(member.getGuild_no());
	%>
	<form name="form1" method="post" action="../post/postWithdrawGuild.jsp">
		<table align="center" cellpadding="0" cellspacing="0" width="80%">
		    <tr>
		        <td width="100"><span style="font-size:9pt;">길드명</span></td>
		        <td width="500"><span style="font-size:9pt;"><%=guild.getName() %></span></td>
		    </tr>
		    <tr>
		        <td width="100"><span style="font-size:9pt;">직책</span></td>
		        <td width="500"><span style="font-size:9pt;"><%=member.getJob_name() %></span></td>
		    </tr>
		    <tr>
		        <td width="100"><span style="font-size:9pt;">길드원 수</span></td>
		        <td width="500"><span style="font-size:9pt;"><%=guild.getMember_cnt() %></span>        </td>
		    </tr>
		    <tr>
		        <td width="100"><span style="font-size:9pt;">길드 포인트</span></td>
		        <td width="500"><span style="font-size:9pt;"><%=guild.getPoint() %></span>        </td>
		    </tr>
		    <tr>
		        <td width="100"><span style="font-size:9pt;">길드 등급</span></td>
		        <td width="500"><span style="font-size:9pt;"><%=guild.getGrade().getName() %></span>        </td>
		    </tr>
		    <tr>
		        <td width="100"><span style="font-size:9pt;">길드 경험치 혜택</span></td>
		        <td width="500"><span style="font-size:9pt;"><%=guild.getGrade().getBenefit_exp() %></span>        </td>
		    </tr>
		</table>
		<input type="submit" name="action" value="withdraw">
	</form>
	<% }%>

</body>
</html>